﻿@model  HomeControllerModel.Index
<div class="page">
    <div class="pageHeader">
        <form id="pagerForm" onsubmit="return navTabSearch(this);" action="/order" method="post">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>
                        订单号：</label>
                    <input name="OrderId" type="text" maxlength="24" value="@Model.OrderId" />
                </li>
                <li>
                    <label>
                        状 态：
                    </label>
                    <select name="Status">
                        <option value="" @(!Model.Status.HasValue ? "selected=selected" : string.Empty)>请选择</option>
                    </select>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        </form>
    </div>
    <div class="pageContent">
        <div class="panelBar">
            <ul class="toolBar">
                <li><a class="edit" href="/order/home/detail/{param}" target="dialog" title="订单详细信息"
                    mask="true" width="880" height="650" onclick="javascript:void(0);"><span>详细信息</span></a></li>
            </ul>
        </div>
        <table class="table" layouth="138" width="100%">
            <thead>
                <tr>
                    <th width="200" align="center">
                        订单编号
                    </th>
                    <th width="80">
                        订单类型
                    </th>
                    <th width="60">
                        商品数量
                    </th>
                    <th width="80">
                        商品金额
                    </th>
                    <th width="80">
                        运 费
                    </th>
                    <th width="80">
                        优 惠
                    </th>
                    <th width="80">
                        实付款
                    </th>
                    <th width="80">
                        发 票
                    </th>
                    <th width="80">
                        支付方式
                    </th>
                    <th width="80">
                        物流方式
                    </th>
                    <th width="200">
                        买 家（Id）
                    </th>
                    <th width="100">
                        卖 家
                    </th>
                    <th width="100">
                        状 态
                    </th>
                    <th>
                        收货人信息
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var o in Model.Orders)
                {
                    <tr target="param" rel="@o.Id">
                        <td>@o.Id
                        </td>
                        <td>@(Order.CategoryDic.FirstOrDefault(x => x.Key == o.Category).Value)
                        </td>
                        <td>@(o.Quantity)
                        </td>
                        <td>
                            @(o.SubTotal.ToString("N"))
                        </td>
                        <td>@(o.Postage.ToString("N"))
                        </td>
                        <td>@(o.Discount.ToString("N"))
                        </td>
                        <td>@(o.Paid.ToString("N"))
                        </td>
                        <td>@(o.HasInvoice)
                        </td>
                        <td>@(o.PaymentType)
                        </td>
                        <td>@(o.ShippingType)
                        </td>
                        <td>@(o.CreatedBy)
                            (@(o.BuyerId))
                        </td>
                        <td>@(o.SellerNick)
                        </td>
                        <td>@(o.Status)
                        </td>
                        <td>@(o.Province + "  " + o.City + "  " + o.District + "  " + o.Address + "  " + o.PostalCode + "  (" + o.Mobile + "  " + o.Phone + ")")
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
